package com.heima.media.mq;


import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

/**
 * 监听步骤
 * 1.交给spring管理，@Component
 * 2.@KafkaListener(topic="xxx",gorupId="xxx")
 */

@Component

public class BackQueueArticleListener {
    /**
     * 监听安全风控服务返回的审核结果
     */
    @KafkaListener(topics = "backQueue",groupId = "articleVerifyResultGroup")
    public void articleVerifyResultBack(ConsumerRecord<?,?>record){
        //结果对象
        Object resultData = record.value();
        System.out.println(resultData);


    }

}
